#include <stdio.h>

int gets(char *str)
{
    char *p = str;
    while ((*p = fgetc(stdin)) != '\n')
        p++;
    *p = '\0';
}